#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
typedef long long LL;
typedef double db;
inline int read()
{
	int x=0,f=1;
	char ch=getchar();
	while(ch<'0'||ch>'9') { if(ch=='-')f=-1; ch=getchar(); }
	while(ch>='0'&&ch<='9') { x=(x<<1)+(x<<3)+ch-'0'; ch=getchar(); }
	return x*f;
}
const int MAXN=160,MOD=12345678;
int n,m,K,f[MAXN*2][MAXN][21][21],ans;
int main()
{
	n=read();m=read();K=read();
	f[0][0][0][0]=1;
	for(int i=0;i<n+m;++i)
		for(int j=0;j<=n;++j)
			for(int k=0;k<=K;++k)
				for(int l=0;l<=K;++l)
					if(f[i][j][k][l])
					{
						if(k+1<=K&&j+1<=n)
							f[i+1][j+1][k+1][max(l-1,0)]=(f[i+1][j+1][k+1][max(l-1,0)]+f[i][j][k][l])%MOD;
						if(l+1<=K&&i-j+1<=m)
							f[i+1][j][max(k-1,0)][l+1]=(f[i+1][j][max(k-1,0)][l+1]+f[i][j][k][l])%MOD;
					}
	for(int i=0;i<=n;++i)
		for(int j=0;j<=K;++j)
			for(int k=0;k<=K;++k)
				ans=(ans+f[n+m][i][j][k])%MOD;
	printf("%d\n",ans);
	return 0;
}
